Skip to content

Glasgow | Prati Amalden | Module Complexity | Sprint 1 | Analyse and Refactor in python#68

Open
PratiAmalden wants to merge 1 commit intoCodeYourFuture:mainfrom
PratiAmalden:sprint-1-python
Open

Glasgow | Prati Amalden | Module Complexity | Sprint 1 | Analyse and Refactor in python#68
PratiAmalden wants to merge 1 commit intoCodeYourFuture:mainfrom
PratiAmalden:sprint-1-python

Conversation

@PratiAmalden
Copy link

No description provided.

@github-actions
Copy link

Your PR couldn't be matched to an assignment in this module.

Please check its title is in the correct format, and that you only have one PR per assignment.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@PratiAmalden PratiAmalden added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 12, 2025
@github-actions
Copy link

Your PR couldn't be matched to an assignment in this module.

Please check its title is in the correct format, and that you only have one PR per assignment.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 12, 2025
@PratiAmalden PratiAmalden changed the title Glasgow | Prati Amalden | Module Complexity | Sprint 1 | python Glasgow | Prati Amalden | Module Complexity | Sprint 1 | Analyse and Refactor in python Feb 24, 2026
@PratiAmalden PratiAmalden added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 24, 2026
Comment on lines +26 to +27
total_sum = 0
total_product = 1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both names seem to be longer than necessary. sum and product are meaningful enough.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 2, 2026
Comment on lines +24 to +27
for item in first_sequence:
if item in second_set and item not in seen:
seen.add(item)
common_items.append(item)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is correct.

Could consider taking advantage of built-in methods of a set -- less code and more efficient.
https://realpython.com/python-sets/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants